<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>选择链接</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
	<link href="__STATIC__/imgsrc/designer.css" rel="stylesheet">
	<style>
	#urlqr img{margin:0 auto}
	.fe-tab-link::-webkit-scrollbar {width: 2px;height: 0px;}
	.fe-tab-link::-webkit-scrollbar-thumb {border-radius: 1px;-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0.5);background: rgba(0,0,0,0.5);}
	.fe-tab-link::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 0px rgba(0,0,0,0.2);border-radius: 0;background: rgba(0,0,0,0);}
	</style>
</head>
<body style="margin:0;">
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
	<div class="layui-card layui-col-md12">
	<div class="layui-tab">
		<ul class="layui-tab-title">
				<li id="fe-tab-link-nav-1" style="padding:0 8px" class="layui-this">基础功能</li>
				{if $auth_data=='all' || in_array('ShopCategory/*',$auth_data)}<li id="fe-tab-link-nav-2" style="padding:0 8px">商品分类</li>{/if}
				{if $auth_data=='all' || in_array('ShopGroup/*',$auth_data)}<li id="fe-tab-link-nav-3" style="padding:0 8px">商品分组</li>{/if}
				{if $auth_data=='all' || in_array('ShopProduct/*',$auth_data)}<li id="fe-tab-link-nav-4" style="padding:0 8px">商城商品</li>{/if}
				{if $auth_data=='all' || in_array('CollageProduct/*',$auth_data)}<li id="fe-tab-link-nav-5" style="padding:0 8px">拼团商品</li>{/if}
				{if $auth_data=='all' || in_array('KanjiaProduct/*',$auth_data)}<li id="fe-tab-link-nav-6" style="padding:0 8px">砍价商品</li>{/if}
				{if $auth_data=='all' || in_array('ScoreshopProduct/*',$auth_data)}<li id="fe-tab-link-nav-7" style="padding:0 8px">{:t('积分')}商城</li>{/if}
				{if $auth_data=='all' || in_array('ArticleCategory/*',$auth_data)}<li id="fe-tab-link-nav-8" style="padding:0 8px">文章分类</li>{/if}
				{if $auth_data=='all' || in_array('Article/*',$auth_data)}<li id="fe-tab-link-nav-9" style="padding:0 8px">文章</li>{/if}
				{if $auth_data=='all' || in_array('Business/category',$auth_data)}<li id="fe-tab-link-nav-10" style="padding:0 8px">商家分类</li>{/if}
				{if $auth_data=='all' || in_array('Business/*',$auth_data)}<li id="fe-tab-link-nav-11" style="padding:0 8px">商家</li>{/if}
				{if getcustom('xixie')}
					{if $auth_data=='all' || in_array('XixieCategory/*',$auth_data)}<li id="fe-tab-link-nav-2" style="padding:0 8px">洗鞋商品分类</li>{/if}
				{/if}
				{if getcustom('goods_hexiao')}
					{if $auth_data=='all' || in_array('RestaurantProduct/*',$auth_data)}<li id="fe-tab-link-nav-2" style="padding:0 8px">外卖商品</li>{/if}
				{/if}
				{if $auth_data=='all' || in_array('DesignerPage/*',$auth_data) || in_array('DesignerPage/index',$auth_data)}<li id="fe-tab-link-nav-12" style="padding:0 8px">设计页面</li>{/if}
				{if $Request.param.type!='geturl'}<li id="fe-tab-link-nav-13" style="padding:0 8px">功能</li>{/if}

				{if $auth_data=='all' || in_array('CycleProduct/*',$auth_data)}<li id="fe-tab-link-nav-14" style="padding:0 8px">周期购商品</li>{/if}
				{if $auth_data=='all' || in_array('TuangouProduct/*',$auth_data)}<li id="fe-tab-link-nav-14" style="padding:0 8px">团购商品</li>{/if}
				{if $auth_data=='all' || in_array('LuckyCollageProduct/*',$auth_data)}<li id="fe-tab-link-nav-14" style="padding:0 8px">幸运拼团商品</li>{/if}
				{if getcustom('ddbb_luckycollage')}
					{if $auth_data=='all' || in_array('LuckyCollageCategory/*',$auth_data)}<li id="fe-tab-link-nav-8" style="padding:0 8px">幸运拼团分类</li>{/if}
				{/if}
				{if getcustom('extend_kecheng_fenhong')}
					{if $auth_data=='all' || in_array('KechengCategory/*',$auth_data)}<li id="fe-tab-link-nav-8" style="padding:0 8px">课程分类</li>{/if}
				{/if}
				{if getcustom('form_data')}
					{if $auth_data=='all' || in_array('Form/*',$auth_data)}<li id="fe-tab-link-nav-8" style="padding:0 8px">表单数据</li>{/if}
				{/if}
		</ul>
		<div class="layui-tab-content" style="padding:0">
				<div class="layui-tab-item layui-show fe-tab-link" id="fe-tab-link-1">
						<div class="page-header" style="margin:20px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 基础页面</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pages/index/index','首页')">首页</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/my/usercenter','{:t('会员')}中心')">{:t('会员')}中心</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/classify','分类商品')">分类商品</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/prolist','商品列表')">商品列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/cart','购物车')">购物车</div>
						{if $auth_data=='all' || in_array('ShopProduct/*',$auth_data)}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 商城页面</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pages/shop/category1','一级分类')">一级分类</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/category2','二级分类')">二级分类</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/category4','二级分类2')">二级分类2</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/category3','三级分类')">三级分类</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/classify','分类商品')">分类商品</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/classify2','分类商品2')">分类商品2</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/prolist','商品列表')">商品列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/fastbuy','快速购买')">快速购买</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/fastbuy2','快速购买2')">快速购买2</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/cart','购物车')">购物车</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/shop/search','商品搜索')">商品搜索</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/order/orderlist','订单列表')">订单列表</div>
						{/if}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 活动页面</h4>
						</div>
						{if $auth_data=='all' || in_array('SeckillProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/seckill/index','秒杀列表')">秒杀列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/seckill/orderlist','秒杀订单')">秒杀订单</div>
						{/if}

						{if $auth_data=='all' || in_array('KanjiaProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/kanjia/index','砍价列表')">砍价首页</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/kanjia/orderlist','砍价订单')">砍价订单</div>
						{/if}
						{if $auth_data=='all' || in_array('CollageProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/collage/index','拼团列表')">拼团首页</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/collage/orderlist','拼团订单')">拼团订单</div>
						{/if}
						{if $auth_data=='all' || in_array('ScoreshopProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/scoreshop/index','{:t('积分')}兑换')">积分兑换</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/scoreshop/orderlist','{:t('积分')}兑换订单')">积分兑换订单</div>
						{/if}
						{if getcustom('plug_luckycollage')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luckycollage/index','幸运拼团预告页')">幸运拼团预告页</div>
						{/if}
						{if $auth_data=='all' || in_array('LuckyCollageProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luckycollage/classify','幸运拼团分类')">幸运拼团分类</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luckycollage/prolist','幸运拼团列表')">幸运拼团列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luckycollage/orderlist','幸运拼团订单')">幸运拼团订单</div>
						{/if}

						{if $auth_data=='all' || in_array('TuangouProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/tuangou/prolist','团购商品')">团购商品</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/tuangou/orderlist','团购订单')">团购订单</div>
						{/if}

						{if $auth_data=='all' || in_array('Sign/set',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/sign/index','签到')">签到</div>
						{/if}

						{if getcustom('everyday_hongbao') && ($auth_data=='all' || in_array('HongbaoEveryday/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/hongbaoEveryday/index','每日红包')">每日红包</div>
						{/if}
						{if getcustom('yx_kouling') && ($auth_data=='all' || in_array('Kouling/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/yx/kouling','口令')">口令</div>
						{/if}
						{if getcustom('yx_choujiang_manren') && ($auth_data=='all' || in_array('ChoujiangManren/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/lottery/index','满人开奖')">满人开奖</div>
						{/if}

						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> {:t('会员')}中心</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pages/my/usercenter','{:t('会员')}中心')">{:t('会员')}中心</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/favorite','我的收藏')">我的收藏</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/history','我的足迹')">我的足迹</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/scorelog','{:t('积分')}明细')">{:t('积分')}明细</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/money/recharge','{:t('会员')}充值')">{:t('会员')}充值</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/money/moneylog','{:t('余额')}明细')">{:t('余额')}明细</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/money/withdraw','{:t('余额')}提现')">{:t('余额')}提现</div>
						{if getcustom('money_transfer') || getcustom('money_friend_transfer')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/money/rechargeToMember','{:t('余额')}转账')">{:t('余额')}转账</div>
						{/if}
						{if getcustom('score_transfer')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/scoreTransfer','{:t(\'积分\')}转赠')">{:t('积分')}转赠</div>
						{/if}
						{if getcustom('product_givetongzheng')}
							{if $auth_data=='all' || in_array('Tongzheng/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/my/tongzhengtransfer','{:t(\'通证\')}转赠')">{:t('通证')}转赠</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/my/tongzhengorderlog','{:t(\'通证\')}释放记录')">{:t('通证')}订单记录</div>
							{/if}
						{/if}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/set','个人设置')">个人设置</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/paypwd','支付密码')">支付密码</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/levelinfo','{:t('会员')}等级')">{:t('会员')}等级</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/my/levelup','{:t('会员')}升级')">{:t('会员')}升级</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/address/address','收货地址')">收货地址</div>
						{if $auth_data=='all' || in_array('Coupon/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/coupon/couponlist','领券中心')">领券中心</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/coupon/mycoupon','我的{:t('优惠券')}')">我的{:t('优惠券')}</div>
						{/if}
						{if getcustom('woniudz')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/myteamline','我的上下级')">我的上下级</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/mysameline','我的同级会员')">我的同级会员</div>
						{/if}
						{if getcustom('member_friend')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/friend/index','我的好友')">我的好友</div>
						{/if}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/index/login','用户登录')">用户登录</div>
						{if getcustom('other_money')}
							{if $othermoney_status}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/moneylog?type=money2','{:t('余额2')}明细')">{:t('余额2')}明细</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/withdraw?type=money2','{:t('余额2')}提现')">{:t('余额2')}提现</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/moneylog?type=money3','{:t('余额3')}明细')">{:t('余额3')}明细</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/withdraw?type=money3','{:t('余额3')}提现')">{:t('余额3')}提现</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/moneylog?type=money4','{:t('余额4')}明细')">{:t('余额4')}明细</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/withdraw?type=money4','{:t('余额4')}提现')">{:t('余额4')}提现</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/moneylog?type=money5','{:t('tivity/yuyue/apply余额5')}明细')">{:t('余额5')}明细</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/withdraw?type=money5','{:t('余额5')}提现')">{:t('余额5')}提现</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/othermoney/frozen_moneylog','{:t('冻结金额')}明细')">{:t('冻结金额')}明细</div>
							{/if}
						{/if}
						{if getcustom('member_archives')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/archives/index','档案列表')">档案列表</div>
						{/if}
						{if getcustom('product_glass')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/glass/index','验光档案')">验光档案</div>
						{/if}
						{if $auth_data=='all' || in_array('cashier/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/cashier/orderlist','收银台订单')">收银台订单</div>
					  	{/if}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/cashback/index','返现参与列表')">返现参与列表</div>
						{if getcustom('yx_queue_free')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/queueFree/index','排队免单记录')">排队免单记录</div>
						{/if}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 分销页面</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/commission/myteam','我的团队')">我的团队</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/index','我的{:t('佣金')}')">我的{:t('佣金')}</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/downorder','分销订单')">分销订单</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/commissionlog','{:t('佣金')}明细')">{:t('佣金')}明细</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/poster','分享海报')">分享海报</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/fhlog','分红记录')">分红记录</div>
						{if getcustom('commissionranking')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/commission/commissionranking','佣金排行榜')">佣金排行榜</div>
						{/if} 
						{if getcustom('fenhong_ranking')}
						{if $auth_data=='all' || in_array('Commission/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/commission/fenhongranking','分红排行榜')">分红排行榜</div>
						 {/if}
						{/if}
						{if getcustom('business_fenxiao') && ($auth_data=='all' || in_array('BusinessFenxiao/*',$auth_data))}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/businessFenxiao/shuju','店铺分销')">店铺分销</div>
						{/if}

						{if $auth_data=='all' || in_array('Restaurant/*',$auth_data)}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 餐饮页面</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/takeaway/index?bid={$bid}','外卖')">外卖</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/takeaway/orderlist','外卖订单')">外卖订单</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/shop/index?bid={$bid}','点餐')">点餐</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/shop/orderlist','点餐订单')">点餐订单</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/booking/add?bid={$bid}','预定')">预定</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/booking/orderlist','预定记录')">预定记录</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/queue/index?bid={$bid}','排队')">排队</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/queue/record?bid={$bid}','排队记录')">排队记录</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/restaurant/deposit/orderdetail','寄存')">寄存</div>
						{/if}

						{if getcustom('zhaopin') && $bid==0 && ($auth_data=='all' || in_array('Zhaopin/*',$auth_data))}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
							<h4><i class="fa fa-folder-open-o"></i> 招聘页面</h4>
						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/zhaopin/index','招聘')">招聘列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/qiuzhi/index','求职')">求职列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/zhaopin/add','发布招聘')">发布招聘</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/qiuzhi/add','发布求职')">发布求职</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/zhaopin/record','我的投递')">我的投递</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/zhaopin/my','我的发布')">我的发布</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/zhaopin/assuranceorder','保证金')">保证金</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/notice/index','消息中心')">消息中心</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/qiuzhi/qianyue','技师签约')">技师签约</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/zhaopin/agent/apply','代理入驻')">代理入驻</div>
						{/if}

						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
								<h4><i class="fa fa-folder-open-o"></i> 其他页面</h4>
						</div>
						{if $auth_data=='all' || in_array('Business/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/business/apply','商家入驻')">商家入驻</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/business/blist','商家列表')">商家列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/business/clist','分类商家')">分类商家</div>
						{/if}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/maidan/pay','买单收款')">买单收款</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/maidan/maidanlog','买单记录')">买单记录</div>
						{if $auth_data=='all' || in_array('Form/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/form/formlog','提交记录')">表单提交记录</div>
						{/if}
						{if $auth_data=='all' || in_array('Article/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pages/article/artlist','文章列表')">文章列表</div>
						{/if}
						{if $auth_data=='all' || in_array('Lipin/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/lipin/index','礼品卡兑换')">礼品卡兑换</div>
						{/if}
						{if $auth_data=='all' || in_array('Luntan/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luntan/index','用户论坛')">用户论坛</div>
							{if getcustom('luntan_call')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luntan/fatielog','论坛发帖记录')">论坛发帖记录</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/luntan/focuslog','论坛关注记录')">论坛关注记录</div>
							{/if}
						{/if}

						{if $auth_data=='all' || in_array('Yuyue/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/yuyue/prolist?bid={$bid}','预约服务')">预约服务</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/yuyue/orderlist?bid={$bid}','预约订单')">预约订单</div>
							{if getcustom('hmy_yuyue')}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/yuyue/peolist2?bid={$bid}','师傅列表')">师傅列表</div>
							{/if}
							{if getcustom('yuyue_apply')}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/yuyue/apply?bid={$bid}','预约师傅申请')">预约师傅申请</div>
							{/if}
						{/if}

						{if $auth_data=='all' || in_array('KechengList/*',$auth_data)}
						{if getcustom('kecheng_discount')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/kecheng/category3','课程分类')">课程分类</div>
						{/if}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/kecheng/list?bid={$bid}','课程列表')">课程列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/kecheng/orderlist?bid={$bid}','我的课程')">我的课程</div>
						{/if}
						{if $auth_data=='all' || in_array('Shortvideo/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/activity/shortvideo/index','短视频')">短视频</div>
						{/if}
						
						{if getcustom('express')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/express/index','查寄快递')">查寄快递</div>
						{/if}
						{if getcustom('workorder')}
							{if $auth_data=='all' || in_array('WorkorderCategory/*',$auth_data)}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/workorder/category','工单类型')">工单类型</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/workorder/index','提交工单')">提交工单</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/workorder/record','工单记录')">工单记录</div>
							{/if}
						{/if}
						{if getcustom('plug_yuebao')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/yuebao/withdraw','余额宝')">余额宝</div>
						{/if}
						{if $image_search}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/shop/imgsearch?bid={$bid}','图搜')">图搜</div>
						{/if}
						{if $diy_light}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/shop/diylight?bid={$bid}','配灯')">配灯</div>
						{/if}
						{if getcustom('pay_yuanbao')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/yuanbao/yuanbaolog','{:t('元宝')}')">{:t('元宝')}</div>
						{/if}
						{if getcustom('renovation_calculator') && ($auth_data=='all' || in_array('RenovationCalculator/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/renovation/form','装修计算器')">装修计算器</div>
						{/if}
						{if getcustom('counsel_fee') && ($auth_data=='all' || in_array('CounselFee/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/counsel/index','律师费计算器')">律师费计算器</div>
						{/if}
						{if getcustom('legal_fee') && ($auth_data=='all' || in_array('LegalFee/*',$auth_data))}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/legal/index','诉讼费计算器')">诉讼费计算器</div>
						{/if}
						{if getcustom('invite_free')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/invite_free/index','我的免单')">我的免单</div>
						{/if}
						{if getcustom('xixie')}
							{if $auth_data=='all' || in_array('XixieSet/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/index','洗鞋商品列表')">洗鞋商品列表</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/orderlist','洗鞋订单列表')">洗鞋订单列表</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/mendianorder','洗鞋门店订单列表')">洗鞋门店订单列表</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/mendianwithdraw','洗鞋提现')">洗鞋提现</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/mendianmoneylog','洗鞋余额记录')">洗鞋余额记录</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/membervip','洗鞋开通会员')">洗鞋开通会员</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/pslogin','洗鞋取货员登录页')">洗鞋取货员登录页</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/psdating','洗鞋取货员接单大厅')">洗鞋取货员接单大厅</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/xixie/psorderlist','洗鞋取货员订单列表')">洗鞋取货员订单列表</div>
							{/if}
						{/if}
						{if getcustom('yueke')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/yueke/prolist','约课列表')">约课列表</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/yueke/orderlist','约课记录')">约课记录</div>
						{/if}

						{if getcustom('car_hailing')}
							{if $auth_data=='all' || in_array('CarHailingProduct/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/carhailing/prolist','约车列表')">约车列表</div>
							{/if}
							{if $auth_data=='all' || in_array('CarHailingOrder/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/carhailing/orderlist','约车记录')">约车记录</div>
							{/if}
							{if $auth_data=='all' || in_array('CarHailingCategory/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/carhailing/classify','约车分类列表')">约车分类列表</div>
							{/if}
						{/if}
						{if $auth_data=='all' || in_array('Mingpian/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/mingpian/index','名片详情')">名片详情</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/mingpian/edit','创建名片')">创建名片</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/mingpian/favorite','名片夹')">名片夹</div>
						{/if}
						
						{if $auth_data=='all' || in_array('CycleProduct/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/cycle/prolist','周期购商品')">周期购商品</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/cycle/orderList','周期购订单')">周期购订单</div>
						{/if}
						{if getcustom('task_banner')}
					   		{if $auth_data=='all' || in_array('TaskBanner/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/taskbanner/index','广告任务')">广告任务</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/taskbanner/record','广告任务记录')">广告任务记录</div>
							{/if}
						{/if}
						{if getcustom('yx_hbtk')}
							{if $auth_data=='all' || in_array('HbtkActivity/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/hbtk/orderlist','拓客活动记录')">拓客活动记录</div>
							{/if}
						{/if}
						{if getcustom('paotui')}
							{if $auth_data=='all' || in_array('PaotuiSet/*',$auth_data)}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/paotui/index','跑腿页面')">跑腿页面</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/paotui/orderlist','跑腿订单列表')">跑腿订单列表</div>
							{/if}
						{/if}
						{if getcustom('article_files')}
							{if $auth_data=='all' || in_array('Article/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/article/record','文章资源列表')">文章资源列表</div>
							{/if}
						{/if}
						{if getcustom('luntan_second_category')}
							{if $auth_data=='all' || in_array('Luntan/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/luntan/class','论坛横版分类')">论坛横版分类</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesExt/luntan/class2','论坛竖版分类')">论坛竖版分类</div>
							{/if}
						{/if}
						{if getcustom('extend_tour')}
							{if $auth_data=='all' || in_array('TourSet/*',$auth_data)}
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/tour/index','活动列表')">活动列表</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/tour/orderlist','活动订单列表')">活动订单列表</div>
								<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/tour/apply','申请导游')">申请导游</div>
							{/if}
						{/if}
						{if getcustom('member_recharge_yj')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/rechargeyj/index','充值业绩页面')">充值业绩页面</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/rechargeyj/log','充值业绩明细')">充值业绩明细</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/rechargeyj/withdraw','充值业绩提现')">充值业绩提现</div>
						{/if}
						{if getcustom('extend_gift_bag')}
							{if $auth_data=='all' || in_array('GiftBag/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/giftbag/index','礼包列表')">礼包列表</div>
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/giftbag/orderlist','礼包订单列表')">礼包订单列表</div>
							{/if}
						{/if}
						{if $auth_data=='all' || in_array('Yuyue/*',$auth_data)}
							{if getcustom('extend_yuyue_car')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/yuyuecar/car','车牌信息')">车牌信息</div>
							{/if}
						{/if}
						{if getcustom('yx_invite_cashback')}
							{if $auth_data=='all' || in_array('InviteCashback/*',$auth_data)}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/my/invitecashbacklog','邀请返现明细')">邀请返现明细</div>
							{/if}
						{/if}
						{if getcustom('product_handwork')}
							<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/handwork/list','回寄总列表')">回寄总列表</div>
						{/if}
						{if getcustom('score_ranking')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/score/scoreranking','{:t('积分')}排行榜')">{:t('积分')}排行榜</div>
						{/if}
						<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">

						</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/admin/index/index','手机端后台')">手机端后台</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/activity/peisong/dating','配送员抢单大厅')">配送员抢单大厅</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pages/kefu/index','在线咨询')">在线咨询</div>
					{if getcustom('image_ai') && ($auth_data=='all' || in_array('ImgaiOrder/*',$auth_data))}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/imgai/create','百度AI绘画')">百度AI绘画</div>
					{/if}
					{if getcustom('map_mark') && ($auth_data=='all' || in_array('MapmarkOrder/*',$auth_data))}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/mapmark/edit','地图标注')">地图标注</div>
					{/if}
					{if getcustom('video_spider') && ($auth_data=='all' || in_array('VideospiderOrder/*',$auth_data))}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesExt/videospider/analysis','短视频去水印')">短视频去水印</div>
					{/if}
					{if getcustom('health_assessment')}
					{if $auth_data=='all' || in_array('HealthAssessment/*',$auth_data)}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/health/index','量表记录')">量表列表</div>
					{/if}
					{if $auth_data=='all' || in_array('HealthRecord/*',$auth_data)}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/health/record','量表记录')">量表记录</div>
					{/if}
					{/if}
					{if getcustom('sxpay_c2b')}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/sxpay/apply','随行付入驻')">随行付入驻</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/sxpay/myapply','随行付入驻记录')">随行付入驻记录</div>
					{/if}
					{if getcustom('lot_cerberuse')}
					{if $auth_data=='all' || in_array('Cerberuse/*',$auth_data)}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesZ/cerberuse/index','智能开门')">智能开门</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesZ/cerberuse/orderlist','智能开门订单列表')">智能开门订单列表</div>
					{/if}
					{/if}
					{if getcustom('product_bonus_pool')}
					{if $auth_data=='all' || in_array('ShopProduct/product_bonus_pool',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/bonuspool/withdraw','{:t('贡献值')}提现')">{:t('贡献值')}提现</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/bonuspool/commissionlog','{:t('贡献值')}提现记录')">{:t('贡献值')}提现记录</div>
					{/if}
					{/if}
					{if getcustom('coupon_xianxia_buy')}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/xianxia/mycoupon','销售{:t('优惠券')}')">销售{:t('优惠券')}</div>
					 {if $auth_data=='all' || in_array('XianxiaCommissionLog/index',$auth_data)}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/xianxia/commissionlog','线下{:t('优惠券')}打款记录')">线下{:t('优惠券')}打款记录</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/xianxia/membercommissionlog','线下{:t('优惠券')}提现记录')">线下{:t('优惠券')}提现记录</div>
					  {/if}
					{/if}
					{if getcustom('region_partner') && ($auth_data=='all' || in_array('RegionPartner/*',$auth_data))}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/regionpartner/apply','申请合伙人')">申请合伙人</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/regionpartner/partner','申请合伙人记录')">申请合伙人记录</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/regionpartner/fhlog','合伙人分红记录')">合伙人分红记录</div>
					{/if}
					{if getcustom('extend_certificate')}
						{if $auth_data=='all' || in_array('CertificateList/*',$auth_data)}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/certificate/index','证书列表')">证书列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/certificate/mylist','我的证书列表')">我的证书列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/certificate/edit','证书编辑')">证书编辑</div>
						{/if}
					{/if}
					{if getcustom('areafenhong_region_ranking')}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-left:10px;margin-top:10px" onclick="chooseLink(1,'/pagesA/commission/regionagent','区域代理排行榜')">区域代理排行榜</div>
					{/if}
					{if getcustom('camera_hikvision') && ($auth_data=='all' || in_array('Hikvision/*',$auth_data))}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/hikvision/hikvisionlist','海康监控')">海康监控</div>
					{/if}
					{if getcustom('mendian_list')}
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/mendian/list','门店列表')">门店列表</div>
					{/if}
					{if getcustom('member_levelup_auth')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/levelupauth/salelist','约课列表')">售卖列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/levelupauth/saleorderlist','售卖订单')">售卖订单</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/levelupauth/buyorderlist','购买订单')">购买订单</div>
					{/if}

					{if getcustom('yx_gift_pack')}
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/giftpack/list','礼包列表')">礼包列表</div>
						<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/banklist/bank','银行卡列表')">银行卡列表</div>
					{/if}

					{if getcustom('extend_chongzhi')}
					{if $auth_data=='all' || in_array('Livepay/*',$auth_data)}
					<div class="page-header" style="margin:10px 0 0 0;padding-bottom:0">
						<h4><i class="fa fa-folder-open-o"></i> 生活缴费</h4>
					</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/mobile_recharge?type=phone','话费充值')">话费充值</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/ordinary_recharge?type=electric','电费')">电费</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/ordinary_recharge?type=water','水费')">水费</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/ordinary_recharge?type=gas','燃气费用')">燃气费用</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/ordinary_recharge?type=heating','供暖费')">供暖费</div>
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/ordinary_recharge?type=charging','充电桩电费')">充电桩电费</div>		
					<div class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:10px" onclick="chooseLink(1,'/pagesA/livepay/record_recharge?type=all','缴费订单记录')">缴费订单记录</div>
					{/if}				
					{/if}
				</div>
				{if $auth_data=='all' || in_array('ShopCategory/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-2">
					{foreach $clist as $pKey=>$c}
					<div>
						<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLinkCategory(2,'{$c.id}','{$c.name}')">选择</a></div>
							<div style="float:left;">
							{if $c['pic']}<img src="{$c.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
						</div>
						<div class="fe-tab-link-text" style="float:left;height: 40px;">
							{if $c['child']}<i class="layui-icon layui-icon-triangle-d" index={$pKey} type="parent" state="block" style="cursor: pointer;"></i>{/if}
							{$c.name}
						</div>
						</div>
					</div>
					<span class="parent_{$pKey}">
						{foreach $c['child'] as $cKey=>$v}
						<div style="width:97%;float:right">
							<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
								<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/pages/shop/prolist?cid={$v.id}','{$v.name}')">选择</a></div>
								<div style="float:left;">
								{if $v['pic']}<img src="{$v.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
							</div>
							<div class="fe-tab-link-text" style="float:left;height: 40px;">
								{if $v['child']}<i class="layui-icon layui-icon-triangle-d" index={$pKey}{$cKey} type="child" state="block" style="cursor: pointer;"></i>{/if}
								{$v.name}
							</div>
							</div>
						</div>
						{foreach $v['child'] as $v2}
						<div style="width:94%;float:right" class="child_{$pKey}{$cKey}">
							<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
								<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/pages/shop/prolist?cid={$v2.id}','{$v2.name}')">选择</a></div>
								<div style="float:left;">
								{if $v2['pic']}<img src="{$v2.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
							</div>
							<div class="fe-tab-link-text" style="float:left">
								{$v2.name}</div>
							</div>
						</div>
						{/foreach}
						{/foreach}
					</span>
					{/foreach}
				</div>
				{/if}
				{if $auth_data=='all' || in_array('ShopGroup/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-3">
					{foreach $glist as $g}
					<div>
						<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(3,'/pages/shop/prolist?gid={$g.id}','{$g.name}')">选择</a></div>
							<div style="float:left;">
							{if $g['pic']}<img src="{$g.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
						</div>
						<div class="fe-tab-link-text" style="float:left">
							{$g.name}</div>
						</div>
					</div>
					{/foreach}
				</div>
				{/if}
				{if $auth_data=='all' || in_array('ShopProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-4">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="productname" value="" placeholder=请输入商品名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-product">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="producttabledata" lay-filter="producttabledata"></table>
						</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('CollageProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-5">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="collageproductname" value="" placeholder=请输入商品名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-collageproduct">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="collageproducttabledata" lay-filter="collageproducttabledata"></table>
						</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('KanjiaProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-6">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="kanjiaproductname" value="" placeholder=请输入商品名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-kanjiaproduct">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="kanjiaproducttabledata" lay-filter="kanjiaproducttabledata"></table>
						</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('ScoreshopProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-7">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="scoreshopproductname" value="" placeholder=请输入商品名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-scoreshopproduct">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="scoreshopproducttabledata" lay-filter="scoreshopproducttabledata"></table>
						</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('ArticleCategory/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-8">
					{foreach $aclist as $pKey=>$c}
					<div>
						<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
							{if getcustom('article_portion')}
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(8,'/pages/article/artlist?bid={$bid}&cid={$c.id}&look_type=1','{$c.name}')">选择</a></div>
							{/if}
							{if !getcustom('article_portion')}
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(8,'/pages/article/artlist?bid={$bid}&cid={$c.id}','{$c.name}')">选择</a></div>
							{/if}
							<div style="float:left;">
							{if $c['pic']}<img src="{$c.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
						</div>
						<div class="fe-tab-link-text" style="float:left;height: 40px;">
							{if $c['child']}<i class="layui-icon layui-icon-triangle-d" index={$pKey} type="parent" state="block" style="cursor: pointer;"></i>{/if}
							{$c.name}
						</div>
						</div>
					</div>
					{foreach $c['child'] as $cKey=>$v}
					<div style="width:97%;float:right" class="parent_{$pKey}">
						<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
							{if getcustom('article_portion')}
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(8,'/pages/article/artlist?bid={$bid}&cid={$v.id}&look_type=1','{$v.name}')">选择</a></div>
							{/if}
							{if !getcustom('article_portion')}
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(8,'/pages/article/artlist?bid={$bid}&cid={$v.id}','{$v.name}')">选择</a></div>
							{/if}
							<div style="float:left;">
							{if $v['pic']}<img src="{$v.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
						</div>
						<div class="fe-tab-link-text" style="float:left">
							{$v.name}</div>
						</div>
					</div>
					{/foreach}
					{/foreach}
				</div>
				{/if}
				{if $auth_data=='all' || in_array('Article/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-9">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="articlename" value="" placeholder=请输入文章标题进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-article">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="articletabledata" lay-filter="articletabledata"></table>
						</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('Business/category',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-10">
					{foreach $bclist as $bc}
					<div>
						<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(10,'/pagesExt/business/blist?cid={$bc.id}','{$bc.name}')">商家列表</a></div>
							<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(10,'/pagesExt/business/clist?cid={$bc.id}','{$bc.name}')">分类商家</a></div>
							<div style="float:left;">
							{if $bc['pic']}<img src="{$bc.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
						</div>
						<div class="fe-tab-link-text" style="float:left">
							{$bc.name}</div>
						</div>
					</div>
					{/foreach}
				</div>
				{/if}

				{if $auth_data=='all' || in_array('Business/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-11">
						<div class="layui-form layui-inline" style="margin-top:10px">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" style="height:30px;" name="businessname" value="" placeholder=请输入商家名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-business">搜索</button>
						</div>
						<div class="layui-col-md12" style="margin-top:5px">
							<table id="businesstabledata" lay-filter="businesstabledata"></table>
						</div>
				</div>
				{/if}
				{if getcustom('xixie')}
					{if $auth_data=='all' || in_array('XixieCategory/*',$auth_data)}

					<div class="layui-tab-item fe-tab-link" id="fe-tab-link-2">
						{foreach $xixieclist as $c}
						<div>
							<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
								<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/xixie/index?cid={$c.id}','{$c.name}')">选择</a></div>
								<div style="float:left;">
								{if $c['pic']}<img src="{$c.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
							</div>
							<div class="fe-tab-link-text" style="float:left">
								{$c.name}</div>
							</div>
						</div>
							{foreach $c['child'] as $v}
							<div style="width:95%;float:right">
								<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
									<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/xixie/index?cid={$v.id}','{$v.name}')">选择</a></div>
									<div style="float:left;">
									{if $v['pic']}<img src="{$v.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
								</div>
								<div class="fe-tab-link-text" style="float:left">
									{$v.name}</div>
								</div>
							</div>
								{foreach $v['child'] as $v2}
								<div style="width:90%;float:right">
									<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
										<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/xixie/index?cid={$v2.id}','{$v2.name}')">选择</a></div>
										<div style="float:left;">
										{if $v2['pic']}<img src="{$v2.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
									</div>
									<div class="fe-tab-link-text" style="float:left">
										{$v2.name}</div>
									</div>
								</div>
								{/foreach}
							{/foreach}
						{/foreach}
					</div>
					{/if}
				{/if}
				{if getcustom('goods_hexiao')}
					{if $auth_data=='all' || in_array('RestaurantProduct/*',$auth_data)}
					<div class="layui-tab-item fe-tab-link" id="fe-tab-link-4">
							<div class="layui-form layui-inline" style="margin-top:10px">
								<div class="layui-input-inline">
										<input type="text" class="layui-input" style="height:30px;" name="productname" value="" placeholder=请输入商品名称进行搜索>
								</div>
								<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-restaurant_product">搜索</button>
							</div>
							<div class="layui-col-md12" style="margin-top:5px">
								<table id="restaurant_producttabledata" lay-filter="restaurant_producttabledata"></table>
							</div>
					</div>
					{/if}
				{/if}
				<!-- <div class="fe-tab-link" id="fe-tab-link-7">

				</div> -->
				{if $auth_data=='all' || in_array('DesignerPage/*',$auth_data) || in_array('DesignerPage/index',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-12">
					<div class="layui-form layui-col-md12" style="margin-top:10px">
						{if getcustom('design_cat')}
						<?php
						$whereCt = [];
            			$whereCt[] = ['type','=',0];
						$whereCt[] = ['aid','=',aid];
                		$whereCt[] = ['bid','=',bid];
						$whereCt[] = ['status','=',1];
						$whereCt[] = ['is_del','=',0];
						$pageCat = db('designerpage_category')->where($whereCt)->select()->toArray();
						?>
						<div class="layui-inline">
							<div class="layui-input-inline">
								<select name="designerpagecid">
									<option value="">全部</option>
									{foreach $pageCat as $cv}
									<option value="{$cv['id']}">{$cv['name']}</option>
									{/foreach}
								</select>
							</div>
						</div>
						{/if}
						{if getcustom('design_remark')}
						<div class="layui-inline">
							<div class="layui-input-inline">
								<input type="text" class="layui-input" name="designerpageremark" value="" placeholder=请输入页面备注>
							</div>
						</div>
						{/if}
						<div class="layui-inline">
							<div class="layui-input-inline">
									<input type="text" class="layui-input" name="designerpagename" value="" placeholder=请输入页面名称进行搜索>
							</div>
							<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-designerpage">搜索</button>
						</div>
					</div>
					<div class="layui-col-md12" style="margin-top:5px">
						<table id="designerpagetabledata" lay-filter="designerpagetabledata"></table>
					</div>
				</div>
				{/if}
			{if $Request.param.type!='geturl'}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-13">
					<div class="layui-form" lay-filter="" style="padding-top:20px">
					<div class="layui-form-item">
						<label class="layui-form-label" style="width:100px">选择功能：</label>
						<div class="layui-input-inline">
							<input type="radio" title="拨打电话" name="linktype" value="tel" lay-filter="linktype"/>
							<input type="radio" title="小程序客服" name="linktype" value="contact" lay-filter="linktype"/>
							<input type="radio" title="分享转发" name="linktype" value="share" lay-filter="linktype"/>
							<input type="radio" title="扫一扫" name="linktype" value="scan" lay-filter="linktype"/>
							<input type="radio" title="坐标导航" name="linktype" value="location" lay-filter="linktype"/>
							{if in_array('mp',$platform)}<input type="radio" title="领取会员卡" name="linktype" value="getmembercard" lay-filter="linktype"/>{/if}
							{if in_array('wx',$platform)}
							<input type="radio" title="跳转其他微信小程序" name="linktype" value="miniProgram" lay-filter="linktype"/>
							<input type="radio" title="半屏微信小程序" name="linktype" value="embeddedMiniProgram" lay-filter="linktype"/>
							{/if}
							{if in_array('wx',$platform)}<input type="radio" title="小程序激励广告" name="linktype" value="rewardedVideoAd" lay-filter="linktype"/>{/if}
							<input type="radio" title="复制文本" name="linktype" value="copy" lay-filter="linktype"/>
							<input type="radio" title="外部链接" name="linktype" value="url" lay-filter="linktype"/>
							{if getcustom('chooseurl_tosendsms') && in_array('wx',$platform)}
							<input type="radio" title="发送短信" name="linktype" value="sendsms" lay-filter="linktype"/>
							{/if}
							<input type="radio" title="商品收藏" name="linktype" value="addfavorite" lay-filter="linktype"/>
						</div>
						<div class="layui-form-mid layui-word-aux"></div>
					</div>
					<div id="linktype-content">
						<div class="layui-form-item tel" style="display:none">
							<label class="layui-form-label" style="width:100px">电话号码：</label>
							<div class="layui-input-inline">
								<input type="text" name="tel" value="" class="layui-input"/>
							</div>
						</div>
						<div class="layui-form-item contact" style="display:none">
							<label class="layui-form-label" style="width:100px"></label>
							<div class="layui-form-mid layui-word-aux">小程序在线客服仅支持以下组件：单图、按钮、悬浮按钮</div>
						</div>
						<div class="layui-form-item share" style="display:none">
							<label class="layui-form-label" style="width:100px"></label>
							<div class="layui-form-mid layui-word-aux">小程序分享转发仅支持以下组件：单图、按钮、悬浮按钮</div>
						</div>

						<div class="layui-form-item location" style="display:none">
							<label class="layui-form-label" style="width:100px">地点名称：</label>
							<div class="layui-input-inline">
								<input type="text" name="addressname" value="天安门广场" class="layui-input"/>
							</div>
						</div>
						<div class="layui-form-item location" style="display:none">
							<div class="layui-form-label" style="width:100px">经纬度：</div>
							<div class="layui-input-inline" style="width:150px">
								<input class="layui-input" name="longitude" value="116.397827"/>
							</div>
							<div class="layui-form-mid">,</div>
							<div class="layui-input-inline" style="width:150px">
								<input class="layui-input" name="latitude" value="39.90374"/>
							</div>
							<div class="layui-btn  layui-btn-primary" onclick="choosezuobiao()">选择坐标</div>
						</div>
						<div class="layui-form-item getmembercard" style="display:none">
							<label class="layui-form-label" style="width:100px"></label>
							<div class="layui-form-mid layui-word-aux">设置前请先创建微信会员卡</div>
						</div>
						<div class="layui-form-item url" style="display:none">
							<label class="layui-form-label" style="width:100px">链接地址：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="url" value="" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux" style="margin-left:130px">小程序跳转外部链接必须是https://开头的完整链接地址 可打开关联的公众号的文章，其它网页需登录<a href="https://mp.weixin.qq.com/" target="_blank">公众平台小程序账号</a>配置业务域名，个人类型与海外类型的小程序暂不支持使用。</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">小程序 appId：</label>
							<div class="layui-input-inline">
								<input type="text" name="appid1" value="{$rwvideoad.unitid}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">要跳转的小程序AppID，此功能仅小程序或APP可用</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">小程序原始id：</label>
							<div class="layui-input-inline">
								<input type="text" name="username" value="" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">{if in_array('app',$platform)}APP及微信会员卡跳转小程序必填{/if}</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">页面路径：</label>
							<div class="layui-input-inline">
								<input type="text" name="path1" value="" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">不填写则默认打开首页</div>
						</div>
						{if getcustom('tominiprogram_givemoney')}
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送{:t('积分')}：</label>
							<div class="layui-input-inline">
								<input type="text" name="mini_givescore" value="{$rwvideoad.givescore}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">成功跳转后奖励{:t('积分')}数</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送{:t('余额')}：</label>
							<div class="layui-input-inline">
								<input type="text" name="mini_givemoney" value="{$rwvideoad.givemoney}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">成功跳转后奖励{:t('余额')}</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送上级{:t('余额')}：</label>
							<div class="layui-input-inline">
								<input type="text" name="mini_givemoneyparent" value="{$rwvideoad.givemoneyparent}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">成功跳转后奖励上级{:t('余额')}</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">每天限制赠送次数：</label>
							<div class="layui-input-inline">
								<input type="text" name="mini_givetimes" value="{$rwvideoad.givetimes}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">每人每天最多可赠送多少次</div>
						</div>
						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">总限制赠送次数：</label>
							<div class="layui-input-inline">
								<input type="text" name="mini_givetimestotal" value="{$rwvideoad.givetimestotal}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">每人最多可赠送多少次</div>
						</div>
						{/if}

						<div class="layui-form-item miniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px"></label>
						</div>
						<div class="layui-form-item embeddedMiniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">小程序AppID：</label>
							<div class="layui-input-inline">
								<input type="text" name="appid2" value="{$rwvideoad.unitid}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">
								{if $authtype ==1}
								前往[平台-微信小程序-半屏小程序]中进行申请
								{else /}
								请登录<a href="https://mp.weixin.qq.com/">微信公众平台</a>进入[设置-第三方设置-半屏小程序管理]中进行申请
								{/if}
							</div>
						</div>
						<div class="layui-form-item embeddedMiniProgram" style="display:none">
							<label class="layui-form-label" style="width:100px">页面路径：</label>
							<div class="layui-input-inline">
								<input type="text" name="path2" value="" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">不填写则默认打开首页</div>
						</div>
						<div class="layui-form-item copy" style="display:none">
							<label class="layui-form-label" style="width:100px">复制文字内容：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="copytext" value="" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux"></div>
						</div>
						<div class="layui-form-item copy" style="display:none">
							<label class="layui-form-label" style="width:100px">提示文字：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="copymsg" value="复制成功" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">复制后提示文字</div>
						</div>
						
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">广告位ID：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_unitid" value="{$rwvideoad.unitid}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">在小程序后台"流量主-广告管理-激励广告"中查找</div>
						</div>
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送{:t('积分')}：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_givescore" value="{$rwvideoad.givescore}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">观看结束后奖励{:t('积分')}数</div>
						</div>
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送{:t('余额')}：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_givemoney" value="{$rwvideoad.givemoney}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">观看结束后奖励{:t('余额')}</div>
						</div>
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">赠送上级{:t('余额')}：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_givemoneyparent" value="{$rwvideoad.givemoneyparent}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">观看结束后奖励上级{:t('余额')}</div>
						</div>
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">每天限制赠送次数：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_givetimes" value="{$rwvideoad.givetimes}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">每天最多可赠送多少次</div>
						</div>
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">总限制赠送次数：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_givetimestotal" value="{$rwvideoad.givetimestotal}" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">每人最多可赠送多少次</div>
						</div>
						{if getcustom('rewardedVideoAd_url')}
						<div class="layui-form-item rewardedVideoAd" style="display:none">
							<label class="layui-form-label" style="width:100px">跳转链接：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="rad_url" value="{$rwvideoad.rad_url}" id="rad_url" class="layui-input"/>
							</div>
							<div class="layui-btn layui-btn-primary" style="float:left" onclick="chooseUrl2('rad_url')">选择链接</div>
							<div class="layui-form-mid layui-word-aux">广告完成后跳转链接</div>
						</div>
						{/if}

						{if getcustom('chooseurl_tosendsms') && in_array('wx',$platform)}
						<div class="layui-form-item sendsms" style="display:none">
							<label class="layui-form-label" style="width:100px">短信模板ID：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="sendsms_tmpl" value="" id="tmpl_sms" class="layui-input"/>
							</div>
							<div class="layui-form-mid layui-word-aux">模板内容示例：推荐您一个实用的小程序，点击链接前往：${link}</div>
						</div>
						<div class="layui-form-item sendsms" style="display:none">
							<label class="layui-form-label" style="width:100px">链接地址：</label>
							<div class="layui-input-inline" style="width:300px">
								<input type="text" name="sendsms_link" value="" id="sendsms_link" class="layui-input"/>
							</div>
						</div>
						{/if}

					</div>

					<div class="layui-form-item">
						<div class="layui-input-block" style="margin-left:130px;">
							<button class="layui-btn" lay-submit lay-filter="formsubmit">确 定</button>
						</div>
					</div>
					</div>
				</div>
			{/if}

				{if $auth_data=='all' || in_array('CycleProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-14">
					<div class="layui-form layui-inline" style="margin-top:10px">
						<div class="layui-input-inline">
							<input type="text" class="layui-input" style="height:30px;" name="cycleproductname" value="" placeholder=请输入商品名称进行搜索>
						</div>
						<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-cycleproduct">搜索</button>
					</div>
					<div class="layui-col-md12" style="margin-top:5px">
						<table id="cycleproducttabledata" lay-filter="cycleproducttabledata"></table>
					</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('TuangouProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-15">
					<div class="layui-form layui-inline" style="margin-top:10px">
						<div class="layui-input-inline">
							<input type="text" class="layui-input" style="height:30px;" name="tuangouproductname" value="" placeholder=请输入商品名称进行搜索>
						</div>
						<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-tuangouproduct">搜索</button>
					</div>
					<div class="layui-col-md12" style="margin-top:5px">
						<table id="tuangouproducttabledata" lay-filter="tuangouproducttabledata"></table>
					</div>
				</div>
				{/if}
				{if $auth_data=='all' || in_array('LuckyCollageProduct/*',$auth_data)}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-16">
					<div class="layui-form layui-inline" style="margin-top:10px">
						<div class="layui-input-inline">
							<input type="text" class="layui-input" style="height:30px;" name="luckycollageproductname" value="" placeholder=请输入商品名称进行搜索>
						</div>
						<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-luckycollageproduct">搜索</button>
					</div>
					<div class="layui-col-md12" style="margin-top:5px">
						<table id="luckycollageproducttabledata" lay-filter="luckycollageproducttabledata"></table>
					</div>
				</div>
				{/if}
				{if getcustom('ddbb_luckycollage') && ($auth_data=='all' || in_array('LuckyCollageCategory/*',$auth_data))}
				<div class="layui-tab-item fe-tab-link" id="fe-tab-link-17">
					<div class="layui-col-md12" style="margin-top:5px">
						<table id="luckycollagecategorytabledata" lay-filter="luckycollagecategorytabledata"></table>
					</div>
				</div>
				{/if}
				{if getcustom('extend_kecheng_fenhong') && ($auth_data=='all' || in_array('KechengCategory/*',$auth_data))}
					<div class="layui-tab-item fe-tab-link" id="fe-tab-link-2">
						{foreach $kclist as $kcKey=>$kc}
						<div>
							<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
								<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/activity/kecheng/list?bid={$bid}&cid={$kc.id}','{$kc.name}')">选择</a></div>
								<div style="float:left;">
								{if $kc['pic']}<img src="{$kc.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
							</div>
							<div class="fe-tab-link-text" style="float:left;height: 40px;">
								{if $kc['child']}<i class="layui-icon layui-icon-triangle-d" index={$kcKey} type="parent" state="block" style="cursor: pointer;"></i>{/if}
								{$kc.name}
							</div>
							</div>
						</div>
						<span class="parent_{$kcKey}">
							{foreach $kc['child'] as $kcKey=>$kcv}
								<div style="width:97%;float:right">
									<div class="fe-tab-link-line" style='height:60px;line-height:60px;float:left;width:100%;'>
										<div class="fe-tab-link-sub"><a href="javascript:void(0);" onclick="chooseLink(2,'/activity/kecheng/list?bid={$bid}&cid={$kcv.id}','{$kcv.name}')">选择</a></div>
										<div style="float:left;">
										{if $kcv['pic']}<img src="{$kcv.pic}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc'/>{/if}
									</div>
									<div class="fe-tab-link-text" style="float:left;height: 40px;">
										{if $kcv['child']}<i class="layui-icon layui-icon-triangle-d" index={$kcKey}{$kcKey} type="child" state="block" style="cursor: pointer;"></i>{/if}
										{$kcv.name}
									</div>
									</div>
								</div>
							{/foreach}
						</span>
						{/foreach}
					</div>
				{/if}

				{if getcustom('form_data')}
					{if $auth_data=='all' || in_array('Form/*',$auth_data)}
					<div class="layui-tab-item fe-tab-link" id="fe-tab-link-4">
							<div class="layui-form layui-inline" style="margin-top:10px">
								<div class="layui-input-inline">
										<input type="text" class="layui-input" style="height:30px;" name="formname" value="" placeholder=请输入名称进行搜索>
								</div>
								<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="LAY-app-forumreply-search-form">搜索</button>
							</div>
							<div class="layui-col-md12" style="margin-top:5px">
								<table id="formtabledata" lay-filter="formtabledata"></table>
							</div>
					</div>
					{/if}
				{/if}
		</div>
	</div>
	</div>
</div>
</div>
{include file="public/js"/}
<script>
layui.form.on('radio(linktype)', function(data){
	$('#linktype-content .layui-form-item').hide();
	$('.layui-form-item.'+data.value).show();
})

layui.form.on('submit(formsubmit)', function(obj){
	var field = obj.field
	var linktype = field.linktype
	var linkval = '';
	var hrefname = '';
	if(!linktype){
			layer.msg('请选择功能');return;
		}
	if(linktype == 'tel'){
		if(field.tel == ''){
			layer.msg('请填写电话号码');return;
		}
		linkval = field.tel
		hrefname = '拨打电话:'+field.tel;
	}
	if(linktype == 'url'){
		if(field.url == ''){
			layer.msg('请填写链接地址');return;
		}
		linkval = field.url
		hrefname = '外部链接:'+field.url;
	}
	if(linktype == 'contact'){
		hrefname = '在线客服';
	}
	if(linktype == 'scan'){
		hrefname = '扫一扫';
	}
	if(linktype == 'share'){
		hrefname = '分享转发';
	}
	if(linktype == 'location'){
		hrefname = '坐标导航';
		linkval = $('input[name=addressname]').val() + '|' + $('input[name=longitude]').val() + ','+$('input[name=latitude]').val();
	}
	if(linktype == 'getmembercard'){
		hrefname = '领取会员卡';
	}
	if(linktype == 'addfavorite'){
		hrefname = '商品收藏';
	}
	if(linktype == 'miniProgram'){
		if(field.appid1 == ''){
			//layer.msg('请填写小程序appid');return;
		}
		console.log(field)
		if(field.username){
			linkval = field.appid1 + '|'+field.path1 + '|'+field.username;
		}else{
			linkval = field.appid1 + '|'+field.path1+'|';
		}
		hrefname = '小程序:'+linkval;
		{if getcustom('tominiprogram_givemoney')}
		var index = layer.load();
		$.post("{:url('addRewardedVideoAd')}",{id:'{$rwvideoad.id}',type:1,unitid:field.appid1,givescore:field.mini_givescore,givemoney:field.mini_givemoney,givemoneyparent:field.mini_givemoneyparent,givetimes:field.mini_givetimes,givetimestotal:field.mini_givetimestotal},function(res){
			chooseLink(13,linktype+'::'+linkval+'|'+res.adid,hrefname);
			layer.close(index);
		});
		return;
		{/if}
	}
	if(linktype =='embeddedMiniProgram'){
		hrefname = '半屏小程序';
		linkval = field.appid2+'|'+field.path2;
	}
	if(linktype == 'copy'){
		hrefname = '复制';
		linkval = $('input[name=copytext]').val() + '|' + $('input[name=copymsg]').val();
	}
	if(linktype == 'rewardedVideoAd'){
		linkval = field.rad_unitid + '|'+field.rad_givescore + '|'+field.rad_givetimes;
		hrefname = '激励广告:'+field.rad_unitid;
		var index = layer.load();
		$.post("{:url('addRewardedVideoAd')}",{id:'{$rwvideoad.id}',type:0,unitid:field.rad_unitid,givescore:field.rad_givescore,givemoney:field.rad_givemoney,givemoneyparent:field.rad_givemoneyparent,givetimes:field.rad_givetimes,givetimestotal:field.rad_givetimestotal,rad_url:field.rad_url},function(res){
			chooseLink(13,linktype+'::'+res.adid,hrefname);
			layer.close(index);
		});
		return;
	}
	if(linktype == 'sendsms'){
		hrefname = '发送短信';
		linkval = field.sendsms_tmpl + '|'+field.sendsms_link;
	}
	if(linktype == 'url'){
		var hrefurl = linkval;
	}else if(linktype == 'tel'){
		var hrefurl = linktype + ':' + linkval;
	}else{
		var hrefurl = linktype + '::' + linkval;
	}
	chooseLink(13,hrefurl,hrefname)
});

	var chooseUrlField = '';
	function chooseUrl2(field){
		chooseUrlField = field;
		layer.open({type:2,shadeClose:true,area:['900px', '550px'],'title':'选择链接',content:"{:url('DesignerPage/chooseurl')}&callback=chooseLink2"});
	}
	function chooseLink2(urlname,url){
		$("#"+chooseUrlField).val(url);
	}
</script>
<script type="text/html" id="productnameTpl">
		<img src="{{d.pic}}" style="max-width:70px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;">{{# if(d.cid!=0){ }}<span style="color:red">[{{d.cname}}]</span>{{# } }}{{d.name}}</div>
			<div style="padding-top:5px;color:#f60">￥{{d.sell_price}}</div></div>
		</div>
</script>
<script type="text/html" id="articlenameTpl">
		<img src="{{d.pic}}" style="max-height:50px;max-width:50px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;padding-top:5px">{{# if(d.cid>0){ }}<span style="color:red">[{{d.cname}}] </span>{{# } }}{{d.name}}</div>
			<div style="padding-top:5px;font-size:12px">{{d.subname}}</div></div>
		</div>
	</script>
	<script type="text/html" id="kanjianameTpl">
		<img src="{{d.pic}}" style="max-width:70px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;">{{d.name}}</div>
			<div style="color:#666;font-size:12px">原价: ￥{{d.sell_price}}</div>
			<div style="color:#f60;font-size:12px">最低价: ￥{{d.min_price}}</div>
		</div>
	</script>
	<script type="text/html" id="collagenameTpl">
		<img src="{{d.pic}}" style="max-width:70px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;">{{# if(d.cid!=0){ }}<span style="color:red">[{{d.cname}}]</span>{{# } }}{{d.name}}</div>
			<div style="padding-top:5px;color:#f60">￥{{d.sell_price}}</div></div>
		</div>
	</script>
	<script type="text/html" id="scoreshopnameTpl">
		<img src="{{d.pic}}" style="max-width:70px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;">{{d.name}}</div>
			<div style="color:#666;font-size:12px">价值: ￥{{d.sell_price}}</div>
			<div style="color:#f60;font-size:12px">{{d.score_price}}{:t('积分')} {{# if(d.money_price>0){ }}+ {{d.money_price}}元{{# } }}</div>
		</div>
	</script>
	<script type="text/html" id="yuyuenameTpl">
		<img src="{{d.pic}}" style="max-width:70px;float:left"/>
		<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
			<div style="width:100%;">{{# if(d.cid!=0){ }}<span style="color:red">[{{d.cname}}]</span>{{# } }}{{d.name}}</div>
			<div style="padding-top:5px;color:#f60">￥{{d.sell_price}}</div></div>
		</div>
	</script>
<script type="text/html" id="restaurant_productnameTpl">
	<img src="{{d.pic}}" style="max-width:70px;float:left"/>
	<div style="float: left;width:200px;margin-left: 10px;white-space:normal;line-height:20px;">
		<div style="width:100%;">{{# if(d.cid!=0){ }}<span style="color:red">[{{d.cname}}]</span>{{# } }}{{d.name}}</div>
		<div style="padding-top:5px;color:#f60">￥{{d.sell_price}}</div></div>
	</div>
</script>
<script>
  //商品列表
	var productdatawhere = {};
  var tableInsproduct = layui.table.render({
    elem: '#producttabledata'
    ,url: "{:url('shop_product/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#productnameTpl',width:450},
      //{field: 'ggdata', title: '规格 × 库存'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(4,\'/pages/shop/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(producttabledata)', function(obj){
		productdatawhere.field = obj.field;
		productdatawhere.order = obj.type;
		tableInsproduct.reload({
			initSort: obj,
			where: productdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-product)', function(obj){
		var olddatawhere = productdatawhere
		productdatawhere = {name:obj.field.productname}
		productdatawhere.field = olddatawhere.field
		productdatawhere.order = olddatawhere.order
		console.log(productdatawhere)
		tableInsproduct.reload({
			where: productdatawhere,
			page: {curr: 1}
		});
	})

  //拼团商品列表
	var collageproductdatawhere = {};
  var tableInscollageproduct = layui.table.render({
    elem: '#collageproducttabledata'
    ,url: "{:url('collage_product/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#collagenameTpl',width:450},
      //{field: 'ggdata', title: '规格 × 库存'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(5,\'/activity/collage/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(collageproducttabledata)', function(obj){
		collageproductdatawhere.field = obj.field;
		collageproductdatawhere.order = obj.type;
		tableInscollageproduct.reload({
			initSort: obj,
			where: collageproductdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-collageproduct)', function(obj){
		var olddatawhere = collageproductdatawhere
		collageproductdatawhere = {name:obj.field.collageproductname}
		collageproductdatawhere.field = olddatawhere.field
		collageproductdatawhere.order = olddatawhere.order
		console.log(collageproductdatawhere)
		tableInscollageproduct.reload({
			where: collageproductdatawhere,
			page: {curr: 1}
		});
	});


  //周期购商品列表
  var cycleproductdatawhere = {};
  var tableInscycleproduct = layui.table.render({
	  elem: '#cycleproducttabledata'
	  ,url: "{:url('cycle_product/index')}" //数据接口
	  ,page: true //开启分页
	  ,width:1068
	  ,height:480
	  ,cols: [[ //表头
		  //{type:"checkbox"},
		  {field: 'id', title: 'ID',  sort: true,width:80},
		  {field: 'name', title: '商品信息',templet: '#collagenameTpl',width:450},
		  //{field: 'ggdata', title: '规格 × 库存'},
		  {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
		  {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
		  {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(14,\'/pagesExt/cycle/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
	  ]]
  });
  //排序
  layui.table.on('sort(cycleproducttabledata)', function(obj){
	  collageproductdatawhere.field = obj.field;
	  collageproductdatawhere.order = obj.type;
	  tableInscollageproduct.reload({
		  initSort: obj,
		  where: collageproductdatawhere
	  });
  });
  //检索
  layui.form.on('submit(LAY-app-forumreply-search-cycleproduct)', function(obj){
	  var olddatawhere = cycleproductdatawhere
	  cycleproductdatawhere = {name:obj.field.cycleproductname}
	  cycleproductdatawhere.field = olddatawhere.field
	  cycleproductdatawhere.order = olddatawhere.order
	  tableInscycleproduct.reload({
		  where: cycleproductdatawhere,
		  page: {curr: 1}
	  });
  });
	

  //砍价商品列表
	var kanjiaproductdatawhere = {};
  var tableInskanjiaproduct = layui.table.render({
    elem: '#kanjiaproducttabledata'
    ,url: "{:url('kanjia_product/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#kanjianameTpl',width:350},
      {field: 'sort', title: '活动时间',templet:function(d){ return date('Y-m-d H:i',d.starttime) + ' ~ '+date('Y-m-d H:i',d.endtime)},width:250},
      {field: 'status', title: '状态',templet:function(d){
				if(d.status==0){
					return '<span style="color:red">未上架</span>';
				}else{
					if(d.starttime > {:time()}){
						return '<button class="layui-btn layui-btn-sm" style="background-color:#888">未开始</button>';
					}else if(d.endtime < {:time()}){
						return '<button class="layui-btn layui-btn-sm" style="background-color:#3e5">已结束</button>';
					}else if(d.endtime > {:time()} && d.starttime < {:time()}){
						return '<button class="layui-btn layui-btn-sm" style="background-color:#f55">进行中</button>';
					}
				}
			}},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(6,\'/activity/kanjia/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(kanjiaproducttabledata)', function(obj){
		kanjiaproductdatawhere.field = obj.field;
		kanjiaproductdatawhere.order = obj.type;
		tableInskanjiaproduct.reload({
			initSort: obj,
			where: kanjiaproductdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-kanjiaproduct)', function(obj){
		var olddatawhere = kanjiaproductdatawhere
		kanjiaproductdatawhere = {name:obj.field.kanjiaproductname}
		kanjiaproductdatawhere.field = olddatawhere.field
		kanjiaproductdatawhere.order = olddatawhere.order
		console.log(kanjiaproductdatawhere)
		tableInskanjiaproduct.reload({
			where: kanjiaproductdatawhere,
			page: {curr: 1}
		});
	});

	//积分商城商品列表
	var scoreshopproductdatawhere = {};
  var tableInsscoreshopproduct = layui.table.render({
    elem: '#scoreshopproducttabledata'
    ,url: "{:url('scoreshop_product/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#scoreshopnameTpl',width:350},
      {field: 'stock', title: '库存'},
      {field: 'sales', title: '销量',sort: true},
      {field: 'sort', title: '序号',sort: true},
      {field: 'status', title: '状态',templet:function(d){
				if(d.status==0){
					return '<span style="color:red">未上架</span>';
				}else{
					return '<span style="color:green">已上架</span>';
				}
			}},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(7,\'/activity/scoreshop/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(scoreshopproducttabledata)', function(obj){
		scoreshopproductdatawhere.field = obj.field;
		scoreshopproductdatawhere.order = obj.type;
		tableInsscoreshopproduct.reload({
			initSort: obj,
			where: scoreshopproductdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-scoreshopproduct)', function(obj){
		var olddatawhere = scoreshopproductdatawhere
		scoreshopproductdatawhere = {name:obj.field.scoreshopproductname}
		scoreshopproductdatawhere.field = olddatawhere.field
		scoreshopproductdatawhere.order = olddatawhere.order
		console.log(scoreshopproductdatawhere)
		tableInsscoreshopproduct.reload({
			where: scoreshopproductdatawhere,
			page: {curr: 1}
		});
	});

	//团购商品列表
	var tuangouproductdatawhere = {};
  var tableInstuangouproduct = layui.table.render({
    elem: '#tuangouproducttabledata'
    ,url: "{:url('tuangou_product/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#collagenameTpl',width:450},
      //{field: 'ggdata', title: '规格 × 库存'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(5,\'/activity/tuangou/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(tuangouproducttabledata)', function(obj){
		tuangouproductdatawhere.field = obj.field;
		tuangouproductdatawhere.order = obj.type;
		tableInstuangouproduct.reload({
			initSort: obj,
			where: tuangouproductdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-tuangouproduct)', function(obj){
		var olddatawhere = tuangouproductdatawhere
		tuangouproductdatawhere = {name:obj.field.tuangouproductname}
		tuangouproductdatawhere.field = olddatawhere.field
		tuangouproductdatawhere.order = olddatawhere.order
		console.log(tuangouproductdatawhere)
		tableInstuangouproduct.reload({
			where: tuangouproductdatawhere,
			page: {curr: 1}
		});
	});
	//幸运拼团商品列表
	var luckycollageproductdatawhere = {};
  var tableInsluckycollageproduct = layui.table.render({
    elem: '#luckycollageproducttabledata'
    ,url: "{:url('LuckyCollageProduct/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商品信息',templet: '#collagenameTpl',width:450},
      //{field: 'ggdata', title: '规格 × 库存'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(5,\'/activity/luckycollage/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(luckycollageproducttabledata)', function(obj){
		luckycollageproductdatawhere.field = obj.field;
		luckycollageproductdatawhere.order = obj.type;
		tableInsluckycollageproduct.reload({
			initSort: obj,
			where: luckycollageproductdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-luckycollageproduct)', function(obj){
		var olddatawhere = luckycollageproductdatawhere
		luckycollageproductdatawhere = {name:obj.field.luckycollageproductname}
		luckycollageproductdatawhere.field = olddatawhere.field
		luckycollageproductdatawhere.order = olddatawhere.order
		console.log(luckycollageproductdatawhere)
		tableInsluckycollageproduct.reload({
			where: luckycollageproductdatawhere,
			page: {curr: 1}
		});
	});
	{if getcustom('ddbb_luckycollage')}
	//幸运拼团分类
	var luckycollagecategorydatawhere = {};
  var tableInsluckycollagecategory = layui.table.render({
    elem: '#luckycollagecategorytabledata'
    ,url: "{:url('LuckyCollageCategory/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '名称',width:450},
      //{field: 'ggdata', title: '规格 × 库存'},
      {field: 'sort', title: '序号'},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">显示</span>':'<span style="color:red">隐藏</span>'},width:80},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(5,\'/activity/luckycollage/classify?cid={{d.id}}\',\'{{d.name}}\')">商品分类页</button><button class="table-btn" onclick="chooseLink(5,\'/activity/luckycollage/prolist?cid={{d.id}}\',\'{{d.name}}\')">商品列表页</button></div>'}
    ]]
  });
	{/if}

	{if getcustom('goods_hexiao')}
		//外卖商品列表
		var productdatawhere = {};
		var tableInsproduct = layui.table.render({
			elem: '#restaurant_producttabledata'
			,url: "{:url('RestaurantProduct/index')}" //数据接口
			,page: true //开启分页
			,width:1068
			,height:480
			,cols: [[ //表头
				//{type:"checkbox"},
				{field: 'id', title: 'ID',  sort: true,width:80},
				{field: 'name', title: '商品信息',templet: '#restaurant_productnameTpl',width:450},
				{field: 'stock', title: '库存'},
				{field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
				{field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已上架</span>':'<span style="color:red">未上架</span>'},width:80},
				{field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(4,\'/restaurant/takeaway/product?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
			]]
		});
		//排序
		layui.table.on('sort(restaurant_producttabledata)', function(obj){
			productdatawhere.field = obj.field;
			productdatawhere.order = obj.type;
			tableInsproduct.reload({
				initSort: obj,
				where: productdatawhere
			});
		});
		//检索
		layui.form.on('submit(LAY-app-forumreply-search-restaurant_product)', function(obj){
			var olddatawhere = productdatawhere
			productdatawhere = {name:obj.field.productname}
			productdatawhere.field = olddatawhere.field
			productdatawhere.order = olddatawhere.order
			console.log(productdatawhere)
			tableInsproduct.reload({
				where: productdatawhere,
				page: {curr: 1}
			});
		})
	{/if}
	
  //设计页面列表
	var designerpagedatawhere = {};
  var tableInsdesignerpage = layui.table.render({
    elem: '#designerpagetabledata'
    ,url: "{:url('DesignerPage/index')}/ishome/0" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '页面名称',templet: '<div>{{# if(d.ishome==1){ }}<i class="fa fa-home" title="小程序首页" style="color:#fb6b5b;font-size:20px"></i> {{# } }}{{d.name}}</div>',width:403},
      //{field: 'readcount', title: '页面链接',templet: '<div>/pages/main/main?PageId={{d.id}}</div>'},
      //{field: 'sort', title: '序号',width:80,sort: true},
      //{field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'updatetime', title: '最后修改时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.updatetime)},width:200},
      {field: 'operation', title: '操作',templet: function(d){
				var html = '';
				{if input('param.sharegive')==1}
				html += '<button class="table-btn" onclick="chooseLink(12,'+d.id+',\''+d.name+'\')">选择</button>';
				{else}
				html += '<button class="table-btn" onclick="chooseLink(12,\'/pages/index/main?id='+d.id+'\',\''+d.name+'\')">选择</button>';
				{/if}
				{if input('param.fromdsn')==1}
				html += '<button class="table-btn" onclick="chooseLink(12,\'/pages/index/main?id='+d.id+'&reloadthispage=1\',\''+d.name+'\')">当前页加载</button>';
				{/if}
				return html;
      }}
    ]]
  });
	//排序
	layui.table.on('sort(designerpagetabledata)', function(obj){
		designerpagedatawhere.field = obj.field;
		designerpagedatawhere.order = obj.type;
		tableInsdesignerpage.reload({
			initSort: obj,
			where: designerpagedatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-designerpage)', function(obj){
		//var field = obj.field
		var olddatawhere = designerpagedatawhere
		designerpagedatawhere = {name:obj.field.designerpagename}
		designerpagedatawhere.field = olddatawhere.field
		designerpagedatawhere.order = olddatawhere.order
		console.log(obj.field)
		if(obj.field.designerpagecid){
			designerpagedatawhere.cid = obj.field.designerpagecid
		}
		if(obj.field.designerpageremark){
			designerpagedatawhere.remark = obj.field.designerpageremark
		}
		tableInsdesignerpage.reload({
			where: designerpagedatawhere,
			page: {curr: 1}
		});
	})
  //文章列表
	var articledatawhere = {};
  var tableInsarticle = layui.table.render({
    elem: '#articletabledata'
    ,url: "{:url('article/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '文章信息',templet: '#articlenameTpl'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:200},
      //{field: 'sendtime', title: '发布时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.sendtime)},width:120},
      {field: 'status', title: '状态',templet:function(d){ return d.status==1?'<span style="color:green">已发布</span>':'<span style="color:red">未发布</span>'},width:150},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(9,\'/pages/article/detail?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>',width:100}
    ]]
  });
	//排序
	layui.table.on('sort(articletabledata)', function(obj){
		articledatawhere.field = obj.field;
		articledatawhere.order = obj.type;
		tableInsarticle.reload({
			initSort: obj,
			where: articledatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-article)', function(obj){
		var field = obj.field
		var olddatawhere = articledatawhere
		articledatawhere = {name:obj.field.articlename}
		articledatawhere.field = olddatawhere.field
		articledatawhere.order = olddatawhere.order
		tableInsarticle.reload({
			where: articledatawhere,
			page: {curr: 1}
		});
	})
	//商家列表
	var businessdatawhere = {};
  var tableInsbusiness = layui.table.render({
    elem: '#businesstabledata'
    ,url: "{:url('business/index')}" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
			//{type:"checkbox"},
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '商家名称'},
      {field: 'pic', title: '商家图片',templet:function(d){
				return '<img src="'+d.logo+'" style="width:60px;height:60px"/>'
      }},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:200},
      //{field: 'sendtime', title: '发布时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.sendtime)},width:120},
      {field: 'status', title: '状态',width:150,templet:function(d){
				if(d.status==1){
					return '<span style="color:green">已通过</span>'
				}else if(d.status==2){
					return '<span style="color:red">未通过</span>'
				}else{
					return '<span>审核中</span>'
				}
			}},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(9,\'/pagesExt/business/index?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>',width:100}
    ]]
  });
	//排序
	layui.table.on('sort(businesstabledata)', function(obj){
		businessdatawhere.field = obj.field;
		businessdatawhere.order = obj.type;
		tableInsbusiness.reload({
			initSort: obj,
			where: businessdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-business)', function(obj){
		var field = obj.field
		var olddatawhere = businessdatawhere
		businessdatawhere = {name:obj.field.businessname}
		businessdatawhere.field = olddatawhere.field
		businessdatawhere.order = olddatawhere.order
		tableInsbusiness.reload({
			where: businessdatawhere,
			page: {curr: 1}
		});
	})

	{if getcustom('form_data')}
	//表单列表
	var formdatawhere = {};
  var tableInsform = layui.table.render({
    elem: '#formtabledata'
    ,url: "{:url('form/index')}/isopen/1" //数据接口
    ,page: true //开启分页
		,width:1068
		,height:480
    ,cols: [[ //表头
      {field: 'id', title: 'ID',  sort: true,width:80},
      {field: 'name', title: '名称',templet: '#formnameTpl',width:450},
      {field: 'ctime', title: '有效时间',templet: '<div>{{d.starttime}} ~ {{d.endtime}}</div>'},
      {field: 'createtime', title: '创建时间',sort: true,templet:function(d){ return date('Y-m-d H:i',d.createtime)},width:150},
      {field: 'status', title: '状态',width:100},
      {field: 'operation', title: '操作',templet: '<div><button class="table-btn" onclick="chooseLink(4,\'/pagesA/formdata/index?id={{d.id}}\',\'{{d.name}}\')">选择</button></div>'}
    ]]
  });
	//排序
	layui.table.on('sort(formtabledata)', function(obj){
		formdatawhere.field = obj.field;
		formdatawhere.order = obj.type;
		tableInsform.reload({
			initSort: obj,
			where: formdatawhere
		});
	});
	//检索
	layui.form.on('submit(LAY-app-forumreply-search-form)', function(obj){
		var olddatawhere = formdatawhere
		formdatawhere = {name:obj.field.formname}
		formdatawhere.field = olddatawhere.field
		formdatawhere.order = olddatawhere.order
		console.log(formdatawhere)
		tableInsform.reload({
			where: formdatawhere,
			page: {curr: 1}
		});
	})
	{/if}

	$(".layui-icon").click(function(){
		let type = $(this).attr('type');
		let state = $(this).attr('state');
		let index = $(this).attr('index');
		if(type=='parent'){
			if(state=='block'){
				$(".parent_" + index).hide();
			}
			if(state=='hide'){
				$(".parent_" + index).show();
			}
		}
		if(type=='child'){
			if(state=='block'){
				$(".child_" + index).hide();
			}
			if(state=='hide'){
				$(".child_" + index).show();
			}
		}
		if(state=='block'){
			$(this).removeClass("layui-icon-triangle-d")
			$(this).addClass("layui-icon-triangle-r");
			$(this).attr('state','hide');
		}
		if(state=='hide'){
			$(this).addClass("layui-icon-triangle-d")
			$(this).removeClass("layui-icon-triangle-r");
			$(this).attr('state','block');
		}
	})
	
	function chooseLinkCategory(type,cid,hrefname){
		var html = '';
		html+='<div style="margin:auto auto;text-align:center">';
		html+='	<div style="display:flex;justify-content:center;margin-top:40px;color:#333;font-size:16px;">';
		html+='		<a style="margin:0 10px;width:100px;height:50px;line-height:50px;background:#fff;border:1px solid #e7e7eb;border-radius:5px;text-align:center;position:relative;cursor:pointer" onclick="chooseLink(\''+type+'\',\'/pages/shop/prolist?cid='+cid+'\',\''+hrefname+'\')">商品列表</a>';
		html+='		<a style="margin:0 10px;width:100px;height:50px;line-height:50px;background:#fff;border:1px solid #e7e7eb;border-radius:5px;text-align:center;position:relative;cursor:pointer" onclick="chooseLink(\''+type+'\',\'/pages/shop/classify?cid='+cid+'\',\''+hrefname+'\')">分类商品</a>';
		html+='		<div style="margin:0 10px;width:100px;height:50px;line-height:50px;background:#fff;border:1px solid #e7e7eb;border-radius:5px;text-align:center;position:relative;cursor:pointer" onclick="chooseLink(\''+type+'\',\'/pages/shop/classify2?cid='+cid+'\',\''+hrefname+'\')">分类商品2</div>';
		html+='		<div style="margin:0 10px;width:100px;height:50px;line-height:50px;background:#fff;border:1px solid #e7e7eb;border-radius:5px;text-align:center;position:relative;cursor:pointer" onclick="chooseLink(\''+type+'\',\'/pages/shop/fastbuy?cid='+cid+'\',\''+hrefname+'\')">快速购买</div>';
		html+='		<div style="margin:0 10px;width:100px;height:50px;line-height:50px;background:#fff;border:1px solid #e7e7eb;border-radius:5px;text-align:center;position:relative;cursor:pointer" onclick="chooseLink(\''+type+'\',\'/pages/shop/fastbuy2?cid='+cid+'\',\''+hrefname+'\')">快速购买2</div>';
		html+='	</div>'
		html+='</div>'
		layer.open({type:1,area:['600px','220px'],content:html,title:'请选择链接',shadeClose:true})
	}
	function chooseLink(type,hrefurl,hrefname){
		{if $Request.param.type=='geturl'}
			var pagepath = hrefurl.substr(1);
		
			url = '{$Think.const.PRE_URL2}/h5/{$aid}.html#/'+pagepath;
			var html = '';
			html+='<div style="margin:20px">';
			html+='	<div style="width:100%;margin:10px 0" id="urlqr"></div>';
			{if in_array('wx',$platform)}
			html+='	<div style="width:100%;text-align:center"><button class="layui-btn layui-btn-sm layui-btn-primary" onclick="showwxqrcode(\''+pagepath+'\')">查看小程序码</button></div>';
			{/if}
			html+='	<div style="margin-top:30px;height:50px;line-height:25px;">链接地址：<button class="layui-btn layui-btn-xs layui-btn-primary" onclick="copyText(\''+url+'\')">复制</button><br>'+url+'</div>';
			html+='	<div style="height:50px;line-height:25px;">页面路径：<button class="layui-btn layui-btn-xs layui-btn-primary" onclick="copyText(\'/'+pagepath+'\')">复制</button><br>/'+pagepath+'</div>';
			html+='</div>'
			layer.open({type:1,'title':'链接地址',area:['650px','480px'],shadeClose:true,'content':html})
			var qrcode = new QRCode('urlqr', {
				text: 'your content',
				width: 200,
				height: 200,
				colorDark : '#000000',
				colorLight : '#ffffff',
				correctLevel : QRCode.CorrectLevel.L
			});
			qrcode.clear();
			qrcode.makeCode(url);
		{else}
			var urlname = $('#fe-tab-link-nav-' + type).text() + '>' + hrefname
			{if input('param.callback')}
			window.parent.{$Request.param.callback}(urlname,hrefurl,"{$Request.param.args}");
			{else}
			window.parent.chooseLink(urlname,hrefurl,"{$Request.param.args}");
			{/if}
			closeself();
		{/if}
	}
	function showwxqrcode(pagepath){
		var index = layer.load();
		$.post("{:url('getwxqrcode')}",{path:pagepath},function(res){
			layer.close(index);
			if(res.status==0){
				//dialog(res.msg);
				layer.open({type:1,area:['300px','350px'],content:'<div style="margin:auto auto;text-align:center"><div style="color:red;width:280px;height:180px;margin-top:100px">'+res.msg+'</div><div style="height:25px;line-height:25px;">'+pagepath+'</div></div>',title:false,shadeClose:true})
			}else{
				layer.open({type:1,area:['300px','350px'],content:'<div style="margin:auto auto;text-align:center"><img src="'+res.url+'" style="margin-top:20px;max-width:280px;max-height:280px"/><div style="height:25px;line-height:25px;">'+pagepath+'</div></div>',title:false,shadeClose:true})
			}
		})
	}
	function copyText(text) {
			var textarea = document.createElement("textarea"); //创建input对象
			var currentFocus = document.activeElement; //当前获得焦点的元素
			var toolBoxwrap = document.getElementById('NewsToolBox'); //将文本框插入到NewsToolBox这个之后
			toolBoxwrap.appendChild(textarea); //添加元素
			textarea.value = text;
			textarea.focus();
			if (textarea.setSelectionRange) {
					textarea.setSelectionRange(0, textarea.value.length); //获取光标起始位置到结束位置
			} else {
					textarea.select();
			}
			try {
					var flag = document.execCommand("copy"); //执行复制
			} catch (eo) {
					var flag = false;
			}
			toolBoxwrap.removeChild(textarea); //删除元素
			currentFocus.focus();
			if(flag) layer.msg('复制成功');
			return flag;
	}

	function choosezuobiao(address,jd,wd){
		var address = $('input[name=address]').val();
		var jd = $('input[name=longitude]').val();
		var wd = $('input[name=latitude]').val();
		if(!jd){
			jd = '116.397827';
			wd = '39.90374';
		}
		var choosezblayer = layer.open({type:2,shadeClose: true,area: ['800px', '560px'],'title': '选择坐标',content: "{:url('DesignerPage/choosezuobiao')}/Mid/1&address="+(address?address:'')+'&jd='+(jd?jd:'')+'&wd='+(wd?wd:''),btn:['确定','取消'],yes:function(index, layero){
				var longitude = layero.find('iframe').contents().find('#mapjd').val();
				var latitude = layero.find('iframe').contents().find('#mapwd').val();
				$('input[name=longitude]').val(longitude);
				$('input[name=latitude]').val(latitude);
				layer.close(choosezblayer);
			}
		});
	}
</script>
<div id="NewsToolBox"></div>
<!-- <script src="__STATIC__/admin/js/clipboard.min.js"></script> -->
</body>
</html>